|
ITK Programmer's Guide |
||||||||||||
Table of contents |
Intro | General
| TCP Low Level |
TCP High Level |
UDP | DNS
| PPP
|
ITK_TCPSendFile |
|||||||||||||||||||||||||||||||||||||||||
Syntax: |
result := ITK_TCPSendFile(streamRef;pathname;filterFlag;sendBlockSize;startOffset;endOffset)
|
||||||||||||||||||||||||||||||||||||||||
Description: |
Sends a file through a TCP stream. Under MacOS, only the
data fork of the file is sent. The last two parameters allow to send only a portion of the file. ITK's internal buffer is flushed before sending the file. |
||||||||||||||||||||||||||||||||||||||||
Params: |
|
||||||||||||||||||||||||||||||||||||||||
Example: |
$stream := ITK_TCPOpen("host.domain.com";80) If ($stream#0) ... ` wait for connection to be established $err := ITK_TCPSendFile($stream;"C:\MYFILE.TXT") ... |
ITK_TCPRecvFile |
||||||||||||||||||||||||||||||||||||
Syntax: |
result := ITK_TCPRecvFile(streamRef;pathname;filterFlag;optFlag;timeout)
|
|||||||||||||||||||||||||||||||||||
Description: |
Stores all data received on a TCP stream into a file.
Filtering can be applied on the received file. The stream is automatically released before returning control to 4D unless the option flags are set to keep the stream (see optFlag below). |
|||||||||||||||||||||||||||||||||||
Params: |
|
|||||||||||||||||||||||||||||||||||
Example: |
$stream := ITK_TCPOpen("host.domain.com";80) If ($stream#0) ... ` wait for connection to be established $err := ITK_TCPRecvFile($stream;"C:\MYFILE.TXT") ` End If |
ITK_TCPSendPict |
|||||||||||||||||||||||||||||||
Syntax: |
result := ITK_TCPSendPict(streamRef;picture;startOffset;endOffset)
|
||||||||||||||||||||||||||||||
Description: |
Sends a picture content or a part of it through an
established TCP stream. In that case, the picture must already be JPEG or GIF
compressed, for example: COMPRESS PICTURE($myPict;"jpeg";500) $err := ITK_TCPSendPict($stream;$myPict) or $err := ITK_TCPSendPict($stream;ITK_Pict2GIF($myPict))
|
||||||||||||||||||||||||||||||
Params: |
|
||||||||||||||||||||||||||||||
Example: |
COMPRESS PICTURE($myPict;"jpeg";500) $err := ITK_TCPSendPict($stream;$myPict) or $err := ITK_TCPSendPict($stream;ITK_Pict2GIF($myPict)) |
ITK_TCPSendBlob |
|||||||||||||||||||||||||||||||||||||||||
Syntax: |
result := ITK_TCPSendBlob(streamRef;blob;flushFlag;filterFlag;startOffset;endOffset)
|
||||||||||||||||||||||||||||||||||||||||
Description: |
Sends a blob content or a part of it through an
established TCP stream.
|
||||||||||||||||||||||||||||||||||||||||
Params: |
|
||||||||||||||||||||||||||||||||||||||||
Example: |
$stream := ITK_TCPOpen("www.internet-toolkit.com";80) If ($stream#0) ... ` wait for connection to be established $err := ITK_TCPSendBlob($stream;myBlob) ` send the whole blob content $err := ITK_TCPSendBlob($stream;myBlob;0;0;0;1024) ` send first 1024 bytes of the blob ... |
ITK_TCPRecvBlob |
||||||||||||||||||||||||||||||||||||||||||||||
Syntax: |
result := ITK_TCPRecvBlob(streamRef;dataStorage;maxLen;filterFlag;appendFlag;endString;timeout)
|
|||||||||||||||||||||||||||||||||||||||||||||
Description: |
Receives data through an established TCP stream. ITK_TCPRecvBlob will return control:
|
|||||||||||||||||||||||||||||||||||||||||||||
Params: |
|
|||||||||||||||||||||||||||||||||||||||||||||
Example: |
$stream := ITK_TCPOpen("mail.internet-toolkit.com";25) if ($stream#0) ... ` wait for connection to be established $result := ITK_TCPRecvBlob($stream; $myBlob) ` receive available data in a blob ... |